package models

import "time"

type Department struct {
	Id               int64       `json:"id,omitempty"`
	Name             string      `json:"name,omitempty"`
	ParentId         *int64      `json:"parentId,omitempty"`
	ParentDepartment *Department `json:"parentDepartment" gorm:"foreignKey:ParentId"`
	Level            string      `json:"level"`
	CreatedDate      time.Time   `json:"createdDate"`
}

func (d *Department) TableName() string {
	return "sys_department"
}
